package top.lyc829.mymusic.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import top.lyc829.mymusic.R
import top.lyc829.mymusic.databinding.ItemAlbumBinding
import top.lyc829.mymusic.ext.load
import top.lyc829.mymusic.model.bean.AlbumOrSongBean

/**
 * @Author lyc
 * @create 2021-07-15 23:06
 */
class IndexAlbumAdapter: BaseQuickAdapter<AlbumOrSongBean, BaseViewHolder>(
    R.layout.item_album
) {
    override fun convert(holder: BaseViewHolder, item: AlbumOrSongBean) {
        val binding : ItemAlbumBinding = ItemAlbumBinding.bind(holder.itemView)
        binding.ivItemAlbumSong.load(item.picUrl, 10)
        binding.tvItemAlbumSongName.text = item.topText
        binding.tvItemAlbumSongArtist.text = item.bottomText
    }
}